package edu.qqcui.study.config;

import edu.qqcui.study.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * 使用@PropertySource读取外部配置文件中的k/v保存到运行的环境变量中;加载完外部的配置文件以后使用${}取出配置文件的值
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2021-06-27 08:59
 **/
@Configuration
@PropertySource("classpath:/person.properties")
public class MainConfigOfPropertyValues {
	@Bean
	public Person person(){
		return new Person();
	}
}
